home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0793july.archive
/
000027_crash!mead.u.wa…ton.edu!cybele_Mon, 12 Jul 93 21:49:57 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
1KB
Received: by bkhouse.cts.com (V1.16/Amiga)
id AA00000; Mon, 12 Jul 93 21:49:57 PST
Received: from mead.u.washington.edu by crash.cts.com with smtp
(Smail3.1.28.1 #15) id m0oFbk0-00018rC; Mon, 12 Jul 93 21:13 PDT
Received: by mead.u.washington.edu
(5.65/UW-NDC Revision: 2.28 ) id AA27201; Mon, 12 Jul 93 21:13:19 -0700
Date: Mon, 12 Jul 93 21:13:19 -0700
Message-Id: <9307130413.AA27201@mead.u.washington.edu>
From: Jason Simpson <cybele@mead.u.washington.edu>
To: amigae@bkhouse.cts.com
Subject: Rnd() not very random, Mod() not quite working?
Has anyone else noticed that Rnd() on small ranges (2-4 or so) doesn't
produce very random results? Try a routine like:
LOOP
x := Rnd(640)
y := Rnd(400)
c := Rnd(2) + 1 /* To offset from the background */
Plot( x, y, c )
ENDLOOP
You should notice prominent bands of color.
Also, when experimenting with RndQ(), I found that the Mod() function
didn't always return the expected value, for example Mod(40000001,400)
produces the result "610" -- it seems to do this mostly with larger numbers.
Am I making incorrect assumptions here, or is there something wrong?